HTML5 JS API Index > Typed Arrays Tutorials & Specs
Implements ArrayBufferView.
Uint8ClampedArray is defined in order to replace CanvasPixelArray. It
behaves identically to the other typed array views, except that the setters and constructor use
clamping [WEBIDL]
rather than modulo arithmetic when converting incoming number values.
Properties |
const long | BYTES_PER_ELEMENT = 1 |
ArrayBuffer | buffer |
unsigned long | byteLength |
unsigned long | byteOffset |
unsigned long | length |
Constructor |
---|
Uint8ClampedArray(unsigned long length) |
Uint8ClampedArray(Uint8ClampedArray array) |
Uint8ClampedArray(octet[] array) |
Uint8ClampedArray(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length) |
Operations |
octet | get(unsigned long index) |
void | set(any index_array, optional any value_offset) |
Uint8ClampedArray | subarray(long start, long end) |